package com.zhang.zhangapp.bean.shop;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2018/4/10.
 */

public class Ticket implements Parcelable {

    private String shopCode;
    private String faceval;
    private String descr;
    private int shopticketId;
    private String type;
    private String factval;


    public void setShopCode(String shopCode) {
        this.shopCode = shopCode;
    }

    public String getShopCode() {
        return shopCode;
    }

    public void setFaceval(String faceval) {
        this.faceval = faceval;
    }

    public String getFaceval() {
        return (faceval == null || faceval.equals("") ? "0" : faceval);
    }

    public void setDescr(String descr) {
        this.descr = descr;
    }

    public String getDescr() {
        return descr;
    }

    public void setShopticketId(int shopticketId) {
        this.shopticketId = shopticketId;
    }

    public int getShopticketId() {
        return shopticketId;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setFactval(String factval) {
        this.factval = factval;
    }

    public String getFactval() {
        return (factval == null || factval.equals("") ? "0" : factval);
    }

    protected Ticket(Parcel in) {
        shopCode = in.readString();
        faceval = in.readString();
        descr = in.readString();
        shopticketId = in.readInt();
        type = in.readString();
        factval = in.readString();
    }

    public static final Creator<Ticket> CREATOR = new Creator<Ticket>() {
        @Override
        public Ticket createFromParcel(Parcel in) {
            return new Ticket(in);
        }

        @Override
        public Ticket[] newArray(int size) {
            return new Ticket[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(shopCode);
        parcel.writeString(faceval);
        parcel.writeString(descr);
        parcel.writeInt(shopticketId);
        parcel.writeString(type);
        parcel.writeString(factval);
    }
}
